package application;

import java.io.File;
import java.io.Serializable;

public class DownloadState implements Serializable{

	private static final long serialVersionUID = -8947410205309554060L;
	private long skip;
	private File localDownloadingFile;
	private UniqueFileID remoteFile;
	
	public DownloadState( File localFile, UniqueFileID remoteFile, long skip ){
		this.setSkip(skip);
		this.setLocalDownloadingFile(localFile);
		this.setRemoteFile(remoteFile);
	}

	public void setSkip(long skip) {
		this.skip = skip;
	}

	public long getSkip() {
		return skip;
	}

	public void setLocalDownloadingFile(File localDownloadingFile) {
		this.localDownloadingFile = localDownloadingFile;
	}

	public File getLocalDownloadingFile() {
		return localDownloadingFile;
	}

	public void setRemoteFile(UniqueFileID remoteFile) {
		this.remoteFile = remoteFile;
	}

	public UniqueFileID getRemoteFile() {
		return remoteFile;
	}
	
	@Override
	public String toString() {
		return  "downloaded " + skip + " bytes of " + localDownloadingFile.getName() + " from " + remoteFile.getMachineID();
	}
}
